<script setup lang='ts'>
import { useCounterStore } from '@/stores/counter';

const store = useCounterStore()

</script>

<template>
    <div style="width: 200px;height: 200px; border: 3px solid orangered;">
        组件2
        <div>数量:{{ store.count }}</div>
        <div>双倍数量:{{ store.doubleCount }}</div>
        <button @click="store.add">++</button>
        <button @click="store.cut">--</button>
    </div>
</template>

<style scoped></style>